import type { Column } from "@/components/ProTable/ProTable.vue";

import { useGlobalStore } from "@/stores";

const { dictionary, staffList } = useGlobalStore();

const jobCols = dictionary.position.map(({ prop, label }) => ({
  label,
  prop: prop + "Name",
}));

export const columns = [
  {
    label: "值班日期",
    prop: "dutyDate",
    sorter: (a: any, b: any) =>
      new Date(a.dutyDate).getTime() - new Date(b.dutyDate).getTime(),
  },
  ...jobCols,
  {
    label: "值班状态",
    prop: "reponStatus",
    // format: (v: string | number) => v || "正常",
  },
].map((e: Column) => ({ ...e, dataIndex: e.prop, width: 120 }));
